package com.csii.activiti.server.api;

import com.csii.activiti.server.api.vo.Result;
import com.csii.activiti.server.core.entity.ActFlowVariable;
import com.csii.activiti.server.core.service.FlowVariableService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags="流程变量接口")
@RestController
@RequestMapping("/${activity.basic.url:activiti}/flow/variable")
public class FlowVariableController {

    @Autowired
    private FlowVariableService flowVariableService;

    @ApiOperation("查询列表")
    @GetMapping("/queryList")
    public Result<List<ActFlowVariable>> queryList(){
        return Result.ok(flowVariableService.queryList());
    }
}
